package iec104;

public class VSQ {
	
	private short vsq;
	void setVSQValue(short vsq)
	{
		this.vsq=vsq;
	}
	short setVSQ(int num,int sq)
	{
		vsq|=(num&0x7F);
		vsq|=(sq<<7);
		return getVSQ();
	}
	public short getVSQ()
	{
		return (short) (vsq&0xFF);
	}
	public String tostring()
	{
		int m_n=(vsq&0x7F);
		int m_sq=(vsq>>7);
		String vsqstr=new String("VSQ:");
		vsqstr=vsqstr.concat("m_n="+Integer.toString(m_n));
		vsqstr=vsqstr.concat(" m_sq="+Integer.toString(m_sq));
		return vsqstr;
	}
}
